<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定位z-index</title>
    <style>
        .container{
            width:  600px;
            height: 800px;
            padding: 20px;
            border:1px solid black;
            position:relative;
        }
        .box{
            width: 200px;
            height: 200px;
            background: blue;
            position:absolute;
            left: 10px;
            top:10px;
            z-index: 10001;/*不带像素*/
        }
        .box2{
            width:200px ;
            height: 200px;
            background-color:red;
            right:400px;
            bottom:460px;
            position:absolute;
            z-index: 10002;
        }
        p{
            position:absolute;
            border:1px solid #ff0000;
            z-index: 1000000;
            background: #f5f5f5;
            /*background: transparent;背景 */
        }
    </style>
</head>
<body>
<h1>定位</h1>
<hr>
<div class="container">
    <div class="box"></div>
    <div class="box2"></div>
    <p>hello how do you do? hello how do you do? hello how do you do?</p>
</div>

</body>
</html>